﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Expect.WatiN
{    
    /// <summary>
    /// Configuration section for using WatiN with Expect
    /// </summary>
    public class ExpectWatiNSection : ConfigurationSection
    {
        /// <summary>
        /// Current configuration for WatiN
        /// </summary>
        public static ExpectWatiNSection Current
        {
            get
            {
                return (ExpectWatiNSection)ConfigurationManager.GetSection("expect.watin");
            }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("rooturl", IsRequired = false)]
        public string RootUrl
        {
            get { return (string)this["rooturl"]; }
            set { this["rooturl"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("browser", IsRequired = false)]
        public string Browser
        {
            get { return (string)this["browser"]; }
            set { this["browser"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("autoclose", IsRequired = false)]
        public bool AutoClose
        {
            get { return (bool)this["autoclose"]; }
            set { this["autoclose"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("clearcookies", IsRequired = false)]
        public bool ClearCookies
        {
            get { return (bool)this["clearcookies"]; }
            set { this["clearcookies"] = value; }
        }

        /// <summary>
        /// Config for descriptions style name
        /// </summary>
        [ConfigurationProperty("clearcache", IsRequired = false)]
        public bool ClearCache
        {
            get { return (bool)this["clearcache"]; }
            set { this["clearcache"] = value; }
        }
    }
}
